package com.itheima.demo2;

import java.util.Arrays;
import java.util.stream.Stream;

public class StreamDemo2 {
    public static void main(String[] args) {

        int[] arr = {1,2,3,4,5,6};
        String[] arr2 = {"a","b","c","d","e"};


        Arrays.stream(arr).forEach(s -> System.out.print(s));
        System.out.println();
        Arrays.stream(arr2).forEach(s -> System.out.print(s));
        System.out.println();

        //Stream中of静态方法中只能传递 ：引用数据类型，传递：基础数据类型时会把整个数组当成一个元素
        Stream.of("a","b",2,3,4,2.5).forEach(s-> System.out.print(s));

    }
}
